function dd(e) {
e.stopPropagation();
e.preventDefault();
//console.log("drop", e, e.dataTransfer.files);
console.log("droped", e.dataTransfer.files.length);
console.log("droped", e.dataTransfer.files[0].name);
handleFile(e.dataTransfer.files[0]);
}



function MyReader(reader){
        this.reader = reader;

        
}

MyReader.fn = MyReader.prototype = {
    downloadFile:function(){
        this.
    }
}





var DownloadEngine:{


    init:function(){},

    downloadFile:function(file){


        var reader = new FileReader();

    }
}




function handleFileDownload(file) {
    console.log(file);
    var name = file.name;
    var size = file.size;

    var reader = new FileReader();
    console.log(reader);

    reader.onload = function (e) {
        console.log("finish load", e);
    };
    reader.onloadstart = (function () {
        console.log("load start");
    }); 
    reader.onerrror = function (e) {
        console.log("reader error", e);
    };
    reader.onprogress = function (e) {
        if (e.lengthComputable) {
            var total = e.total;
            var curr = e.loaded;
            var percent = parseInt(curr / (total / 100));
            console.log('uploaded ', percent, '%');
        }

    }

    reader.readAsDataURL(file);

}

$(document).ready(function () {
document.getElementById("aa").addEventListener("drop", dd, false);  


});